<?php
namespace modules\book;

use modules\book\model\Book as BookModel;
class Book {
  protected $book;
  public function __construct(BookModel $book) {
    $this->book = $book;
  }
  
  public function data() {
    return $this->book->get();
  }

  public function getFile($res) {
    // return $this->book->where('book_id', 20210005)->update(['cover' => $res]);
    // var_dump($res);
  }

  public function updateImg() {
    return $this->book->where('book_id', 20210005)->update(['cover' => 'imgXX.jpg']);
  }
}
?>